package com.mgy.shardingjdbc.test.dao.mapper.notepad;


import com.mgy.db.TableRouter;
import com.mgy.db.sharding.annotation.MybatisMapper;
import com.mgy.shardingjdbc.test.domain.notepad.Notepad;
import com.mgy.shardingjdbc.test.domain.notepad.TagAndNotepad;
import com.mgy.shardingjdbc.test.query.notepad.NotepadQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 测试
 *
 * @author maguoyong
 * @since 2018/06/22
 */
@MybatisMapper
public interface INotepadDao {

    Integer add(Notepad notepad);


    Integer add(@Param("notepad") Notepad notepad, TableRouter tableRouter);


    Integer updateByKey(Notepad notepad);

    Notepad getOne(NotepadQuery notepadQuery);

    Notepad getByKey(Integer id);

    Notepad getByKey(@Param("id") Integer id, String logicTable, Integer dbNo, Integer tableNo);

    Notepad getByKey(@Param("id") Integer id, List<TableRouter> tableRouters);

    List<Notepad> getNotepadList(@Param("notepadId") Long notepadId, List<TableRouter> tableRouters);

    List<TagAndNotepad> getTagAndNotepad(@Param("userId") Long userId, @Param("tableRouters") List<TableRouter> tableRouters);
}
